package cn.iocoder.an.module.mold.dal.mysql.recheckitem;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.mold.dal.dataobject.recheckitem.RecheckItemDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.mold.controller.admin.recheckitem.vo.*;

/**
 * 模具复检项目 Mapper
 *
 * @author ykk
 */
@Mapper
public interface RecheckItemMapper extends BaseMapperX<RecheckItemDO> {

    default PageResult<RecheckItemDO> selectPage(RecheckItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RecheckItemDO>()
                .likeIfPresent(RecheckItemDO::getName, reqVO.getName())
                .likeIfPresent(RecheckItemDO::getCode, reqVO.getCode())
                .eqIfPresent(RecheckItemDO::getDescription, reqVO.getDescription())
                .betweenIfPresent(RecheckItemDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(RecheckItemDO::getId));
    }

}